package com.duan.laugh.upms.api.pojo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

/**
 * 资源，包括URL
 *
 * @author duanjw
 */
@Data
@ApiModel(value = "资源")
@EqualsAndHashCode(callSuper = true)
public class Resource extends Model<Resource> {

    private static final long serialVersionUID = 1L;
    /**
     * 资源id
     */
    @TableId(type = IdType.AUTO)
    @ApiModelProperty(value = "资源id")
    private Long id;
    /**
     * 资源名称
     */
    @ApiModelProperty(value = "资源名称")
    private String name;
    /**
     * 资源url
     */
    @ApiModelProperty(value = "资源url")
    private String url;
    /**
     * 资源http方法
     */
    @ApiModelProperty(value = "资源http方法")
    private String method;
    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;
    /**
     * 更新时间
     */
    @ApiModelProperty(value = "更新时间")
    private LocalDateTime updateTime;
    /**
     * 0--正常 1--删除
     */
    @TableLogic
    @ApiModelProperty(value = "删除标记,1:已删除,0:正常")
    private String delFlag;
}
